package com.mikhailenko.transportMVC.model.es;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity(name="inputs")
@Table(name="inputs")
public class InputEntity implements Serializable{
    private static final long serialVersionUID = -3016515631313311011L;

    @Id
    @GeneratedValue
    private int id;
    
    @Column(nullable=false)
    private String name;
    
    @Column(nullable=false)
    private boolean type;
    
    @Column(nullable=false)
    private boolean isUsed;
    
    @ManyToOne(optional=false)
    private BlockEntity block;
    
    @Enumerated(EnumType.STRING)
    private TermEnum term;
    

	public boolean isType() {
		return type;
	}

	public void setType(boolean type) {
		this.type = type;
	}

	public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isUsed() {
        return isUsed;
    }

    public void setUsed(boolean isUsed) {
        this.isUsed = isUsed;
    }

    public TermEnum getTerm() {
        return term;
    }

    public void setTerm(TermEnum term) {
        this.term = term;
    }

    public BlockEntity getBlock() {
        return block;
    }

    public void setBlock(BlockEntity block) {
        this.block = block;
    }

    
}
